package org.jwd.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author vizz
 * @since 2022/5/16 10:45
 */
@Data
@Accessors(chain = true)
@TableName("auth")
public class AuthEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;
    private Long userId;
    private String validation;
    private int type;// 0:登陆禁用 1：session 2：jwt

    private LocalDateTime lastLoginTime;
    private String ip;
    private int failCount;

    @TableLogic
    private int deleted;

}
